﻿using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace Gmantis.Controls
{
    public class SlopedBorderAdjustConverter : IValueConverter
    {
        object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            Thickness thickness = (Thickness)value;
            double left = thickness.Top * -0.5;
            return new Thickness(left, 0.0, left, left);
        }

        object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
